<template>
  <el-pagination
    @size-change="handleSizeChange"
    @current-change="handleCurrentChange"
    :current-page="currentPage"
    :page-sizes="[10, 20, 50]"
    :page-size="10"
    layout="total, sizes, prev, pager, next, jumper"
    :total="totalSize">
  </el-pagination>
</template>
<style>

</style>
<script>
    export default {
      props: ['totalSize'],
      data () {
        return {
          pageSize: 10,
          currentPage: 1
        }
      },
      methods: {
        handleSizeChange (val) {
          console.log(`每页 ${val} 条`)
          this.$emit('changePageSize', ['xxxxxxxxxx'])
        },
        handleCurrentChange (val) {
          this.currentPage = val
          console.log(`当前页: ${val}`)
        }
      }
    }

</script>
